package com.cn.wanxi.service;

import com.cn.wanxi.model.ProductModel;

import java.util.List;

public class ProductService {
    public List<ProductModel> getProductList(){
        ProductModel productModel = new ProductModel();
        for (int i = 0; i < productModel.names.length; i++) {
            ProductModel product = new ProductModel();
            product.setName(productModel.names[i]);
            product.setPhoto(productModel.photos[i]);
            product.setUser_type(productModel.user_types[i]);
            product.setPrice(productModel.getPrice());
            productModel.list.add(product);
        }
        return productModel.list;
    }
}
